<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Example 1</title>
<style type="text/css">
html,body {
	margin:0;
	padding:0;
	font-family:Tahoma;
	font-size:12px;
}
input,textarea,select {
	font-family:Tahoma;
	font-size:12px;
}
</style>
<script type="text/javascript" src="../../jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="../../jquery.jcryption-1.0.1.js" ></script>
<script type="text/javascript">

$.fn.fillInForm = function() {
  	$(this).find("a[href='#fillWithSamples']").click(function() {
		$parentForm = $(this).closest("form");
		$parentForm.find(":radio:eq(0)").attr("checked","checked");
		$parentForm.find("input[name='Firstname']").val("John");
		$parentForm.find("input[name='Lastname']").val("Wayne");
		$parentForm.find("input[name='Email']").val("john@wayne.cc");
		$parentForm.find(":checkbox:eq(2)").attr("checked","checked");
		$parentForm.find("select[name='age']").val("over 30");
		$parentForm.find("select[name='likes[]']").children("option:eq(0),option:eq(1),option:eq(3)").attr("selected","selected")
		return false;
	});
};

$(document).ready(function() {
	
	
	$("#normal").jCryption()
	.fillInForm();
	
	$("input,select,textarea").removeAttr("disabled");
	
});
</script>
</head>

<body>
<form id="normal" class="general" action="main.php" method="post"> <fieldset>

<strong><a href="#fillWithSamples" style="color:#000000;">fill with samples &raquo;</a></strong>
<table border="0" cellspacing="5" cellpadding="0">
<tbody>
<tr>
<td>Sex:</td>
<td><input class="radio" name="Sex" type="radio" value="male" />Male

<input class="radio" name="Sex" type="radio" value="female" />Female</td>
</tr>
<tr>
<td>Firstname:</td>
<td><input class="text" name="Firstname" type="text" /></td>
</tr>
<tr>
<td>Lastname:</td>
<td><input class="text" name="Lastname" type="text" /></td>
</tr>
<tr>
<td>E-Mail:</td>
<td><input class="text" name="Email" type="text" /></td>
</tr>
<tr>
<td>What would you like to eat?</td>
<td><input class="checkbox" name="Food[]" type="checkbox" value="pizza" />Pizza

<input class="checkbox" name="Food[]" type="checkbox" value="hamburger" />Hamburger

<input class="checkbox" name="Food[]" type="checkbox" value="salad" />Salad

<input class="checkbox" name="Food[]" type="checkbox" value="steak" />Steak</td>
</tr>
<tr>
<td>Age:</td>
<td><select name="age"> <option value="under 18">under 18</option> <option value="over 18">over 18</option> <option value="over 30">over 30</option> </select></td>
</tr>
<tr valign="top">
<td valign="top">I like (you can select more than one):</td>
<td><select name="likes[]" size="5" multiple="multiple"> <option value="Michael Jackson">Michael Jackson</option> <option value="rainy wheater">rainy wheater</option> <option value="a hot summer">a hot summer</option> <option value="small cats">small cats</option> <option value="funny movies">funny movies</option> <option value="I like everything">I like everything</option> </select></td>
</tr>
<tr>
<td></td>
<td><input title="Submit" alt="Submit" name="submitButton" type="submit" value="Submit" class="submit" /> <input title="Reset" alt="Reset" name="reset" type="reset" value="Reset" /></td>
</tr>
</tbody></table>
</fieldset></form>
</body>
</html>
